package com.caigou.modules.home.network.api

import com.caigou.comm.base.bean.Banner
import com.caigou.comm.base.bean.HttpResult
import com.caigou.comm.base.bean.UserBean
import com.caigou.modules.home.bean.PrizeTimeBean
import com.caigou.modules.home.bean.PrizeBean
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * @author #Suyghur.
 * Created on 2021/09/16
 */
interface HttpHomeApiService {
    @GET("/api/banner/list/1")
    fun getBanners(): Flow<HttpResult<MutableList<Banner>>>

    @GET("/api/prize/list")
    fun getPrizeResult(@Query("type") type: Int, @Query("userId") userId: String): Flow<HttpResult<PrizeBean>>

    @GET("/api/prize/history/list")
    fun getHistoryPrizeList(@Query("type") type: Int, @Query("year") year: Int): Flow<HttpResult<MutableList<PrizeBean>>>

    @GET("/api/prize/next/open/time/list")
    fun getOpenPrizeTime(): Flow<HttpResult<MutableList<PrizeTimeBean>>>

    @POST("/api/prize/update/status")
    fun setMiStatus(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

}